#include "double_link_list.h"
#include "File.h"

Elenemt_data data[10] = 
{
    {.name = "唐三" , .sex = "男" , .age = 18 , .id = 1 , .sco = 60} , 
    {.name = "萧炎" , .sex = "男" , .age = 18 , .id = 2 , .sco = 60} , 
    {.name = "小舞" , .sex = "男" , .age = 18 , .id = 3 , .sco = 60} , 
    {.name = "牧尘" , .sex = "男" , .age = 18 , .id = 4 , .sco = 60} , 
    {.name = "熏儿" , .sex = "男" , .age = 18 , .id = 5 , .sco = 60} ,
    {.name = "张三" , .sex = "男" , .age = 18 , .id = 5 , .sco = 60} ,
};


void double_link_list_1(void)
{
    /* ********************* 初始化 ********************* */
    Double_Link_List * list;
    init_double_link_list(&list);

    /* *********************  插入  ********************* */
    // insert_double_link_list( list  , data[0] , 1);
    // insert_double_link_list( list  , data[1] , 2);
    // insert_double_link_list( list  , data[2] , 3);
    // insert_double_link_list( list  , data[3] , 4);
    // insert_double_link_list( list  , data[4] , 5);
    // insert_double_link_list( list  , data[5] , 3);
    // insert_double_link_list( list  , data[4] , 1);


    /* ******************  从文件插入  ****************** */
    File_scanf( list );

    /* *********************  删除  ********************* */
    // delete_double_link_list( list , 1);

    // delete_double_link_list( list , 5 );

    // delete_double_link_list( list , 80 );

    

    /* *********************  遍历  ********************* */
    print_double_link_list(list);

    /* *********************  销毁  ********************* */
    free_double_link_list(&list);
}


int main(int argc, char const *argv[])
{
    double_link_list_1();
    return 0;
}


